@include('Home.head')
<body>
<link rel="stylesheet" href="{{ URL::asset('js/admin/layui/css/layui.css') }}"/>
<link rel="stylesheet" href="{{ URL::asset('css/admin/team/font-awesome.min.css') }}"/>
<link rel="stylesheet" href="{{ URL::asset('css/admin/team/jquery.orgchart.css') }}"/>
<link rel="stylesheet" href="{{ URL::asset('css/admin/team/style2.css') }}"/>
<link rel="stylesheet" href="{{ URL::asset('css/admin/team/style1.css') }}"/>
<style>
    .orgchart .node .content{
        height: 93px;
    }
</style>
<div class="container" id="app">
    @include('Home.member.header')
    <div class="my-nav-bar">
    	<ol class="am-breadcrumb">
          <li><a href="#">首页</a></li>
          <li><a href="#">我的伙伴</a></li>
        </ol>
    </div>
    <div class="am-cf cart-panel">
        <div class="admin-biaogelist">
            <div class="team-item">
                <form class="am-form-inline" role="form">
                    <div class="am-form-group">
                        接点销售商账号 ：<input class="am-form-field" value="{{$data['name']}}" name="name" placeholder="输入销售商账号">
                    </div>
                    <button type="submit" class="am-btn am-btn-secondary">查询</button>
                    <button type="button"  class="am-btn am-btn-success">重置</button>
                </form>
            </div>
            <div id="chart-container" style="overflow:auto;height: auto"></div>
        </div>
    </div>
    @include('Home.foot')
</div>
</body>
@if (count($errors) > 0)
    @foreach ($errors->all() as $error)
        <script>
            layer.msg("{{$error}}");
        </script>
    @endforeach
@endif
<script src="{{ URL::asset('js/admin/team/jquery.orgchart.js') }}"></script>
{{--<script src="{{ URL::asset('js/admin/team/scripts.js') }}"></script>--}}
<script>
    var datascource = {
        'name': "{{$data['name']}}",
        'title': "{{$data['user_name']}}<br/>{{$data['level_name']}}",
        // 'className': 'product-dept', //绿色
        'className': 'pipeline1', //棕色
        'children':{!! $data['children'] !!}
    };

    $('#chart-container').orgchart({
        'data' : datascource,
        'nodeContent': 'title'
    });
</script>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            title: '我的团队',
        },
    })
</script>
</html>
